<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>AdWords API Documentation</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta><link rel="stylesheet" href="../css/template.css" type="text/css"></link></head><body><div id="content"><h1 class="file">Common/Lib/AdsSoapClient.php</h1><div id="file-nav-box"><div id="file-nav-container"><ul id="file-nav"><li><a href="#classes"><img src="../images/icons/class.png" alt="Class" height="14"></img>
                          Classes
                      </a><ul><li><a href="#\AdsSoapClient">\AdsSoapClient</a></li></ul></li></ul><div style="clear: left;"></div></div><div id="file-nav-tab">
              Table of Contents
          </div></div><a name="top" class="anchor"></a><div id="file-description"><div class="short-description">An extension of the {@link SoapClient} class intended to prepare
the XML before making a request as well as perform any book-keeping on
the response.</div><div class="long-description"><p>PHP version 5</p>

<p>Copyright 2011, Google Inc. All Rights Reserved.</p>

<p>Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at</p>

<pre><code>http://www.apache.org/licenses/LICENSE-2.0
</code></pre>

<p>Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</p></div></div><dl class="file-info"><dt>Author</dt><dd>Adam Rogal
         
    </dd><dt>Author</dt><dd>Eric Koleda
         
    </dd><dt>Author</dt><dd>Vincent Tsao
         
    </dd><dt>Category</dt><dd>WebServices
         
    </dd><dt>Copyright</dt><dd>2011, Google Inc. All Rights Reserved.
         
    </dd><dt>License</dt><dd>http://www.apache.org/licenses/LICENSE-2.0 Apache License,
            Version 2.0
         
    </dd><dt>Package</dt><dd>GoogleApiAdsCommon
         
    </dd><dt>Subpackage</dt><dd>Lib
         
    </dd></dl><a name="classes" class="anchor"></a><a id="\AdsSoapClient" class="anchor"></a><h2 class="class">\AdsSoapClient<div class="to-top"><a href="#top">jump to top</a></div></h2><div class="class"><small class="package"><b>Package: </b>GoogleApiAdsCommon\Lib</small><div class="short-description">An extension of the {@link SoapClient} class intended to prepare
the XML before making a request as well as perform any book-keeping on
the response.</div><div class="long-description"></div><dl class="class-info"><dt>Parent(s)</dt><dd><a href="../files/http://php.net/manual/en/class.soapclient.php">\SoapClient</a></dd><dt>Children</dt><dd><a href="../files/AdWords.Lib.AdWordsSoapClient.html#\AdWordsSoapClient">\AdWordsSoapClient</a></dd></dl><h3>Properties</h3><div><a id="\AdsSoapClient::$headers" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>array <span class="highlight">$headers</span></code><div class="description"><div class="short-description">The header values.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>array</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastArguments" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>array <span class="highlight">$lastArguments</span></code><div class="description"><div class="short-description">The last arguments passed to the called SOAP method</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>array</dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastHeaders" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>array <span class="highlight">$lastHeaders</span></code><div class="description"><div class="short-description">The last headers used in the request.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>array</dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastMethodName" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>string <span class="highlight">$lastMethodName</span></code><div class="description"><div class="short-description">The name of the last method called from this client.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastRequest" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>string <span class="highlight">$lastRequest</span></code><div class="description"><div class="short-description">The last SOAP XML request made to the server after PrepareRequest() and
RemoveSensitiveInfo() have been called on it.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd><dt>Access</dt><dd>protected
         
    </dd><dt>See</dt><dd>\PrepareRequest()
         
    </dd><dt>See</dt><dd>\RemoveSensitiveInfo()
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastRequestDom" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>\DOMDocument <span class="highlight">$lastRequestDom</span></code><div class="description"><div class="short-description">The last SOAP XML DOMDocument request made to the server after
PrepareRequest() and RemoveSensitiveInfo() have been called on it.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd><a href="../files/http://php.net/manual/en/class.domdocument.php">\DOMDocument</a></dd><dt>Access</dt><dd>private
         
    </dd><dt>See</dt><dd>\PrepareRequest()
         
    </dd><dt>See</dt><dd>\RemoveSensitiveInfo()
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastResponse" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>string <span class="highlight">$lastResponse</span></code><div class="description"><div class="short-description">The last SOAP XML response from the server.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastResponseDom" class="anchor"></a><div class="property private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img>\DOMDocument <span class="highlight">$lastResponseDom</span></code><div class="description"><div class="short-description">The last SOAP XML DOMDocument response from the server.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd><a href="../files/http://php.net/manual/en/class.domdocument.php">\DOMDocument</a></dd><dt>Access</dt><dd>private
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$lastSoapFault" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>\SOAPFault <span class="highlight">$lastSoapFault</span></code><div class="description"><div class="short-description">The last SOAP fault generated from the server.</div></div><div class="code-tabs"><div class="long-description"><p><var>NULL</var> if none.</p></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>\SOAPFault</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$options" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>array <span class="highlight">$options</span></code><div class="description"><div class="short-description">The SoapClient options used to construct this class.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>array</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$serviceName" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>string <span class="highlight">$serviceName</span></code><div class="description"><div class="short-description">The name of the service this client is accessing.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$serviceNamespace" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>string <span class="highlight">$serviceNamespace</span></code><div class="description"><div class="short-description">The namespace of the service this client is accessing.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>string</dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$transportLayer" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>null|\SoapClient <span class="highlight">$transportLayer</span></code><div class="description"><div class="short-description">The transport layer override.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd>null | <a href="../files/http://php.net/manual/en/class.soapclient.php">\SoapClient</a></dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::$user" class="anchor"></a><div class="property protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png" alt="&gt;"></img><img src="../images/icons/arrow_down.png" alt="V" style="display: none;"></img></a><code class="title"><img src="../images/icons/property.png" alt="Property"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img>\AdsUser <span class="highlight">$user</span></code><div class="description"><div class="short-description">The {@link AdsUser} which generated this client.</div></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="property-info"><dt>Type</dt><dd><a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></dd><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div></div><h3>Methods</h3><div><a id="\AdsSoapClient::Create()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">Create</span><span class="nb-faded-text">(string $type, array $params = NULL)</span> : mixed</code><div class="description"><p class="short_description">Creates a new object of the given type, using the optional parameters.</p></div><div class="code-tabs"><div class="long-description"><p>When pseudo-namespace support is enabled class names can become very long,
and this function provides an alternative way to create objects that is
more readable.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$type</th><td>string</td><td><em><p>the type of object to create</p></em></td></tr><tr><th>$params</th><td>array</td><td><em><p>parameters to pass into the constructor, as either
    flat array in the correct order for the constructor or as an
    associative array from parameter name to value</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>mixed</td><td>a new instance of a class that represents that type</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GenerateRequestInfoMessage()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GenerateRequestInfoMessage</span><span class="nb-faded-text">()</span> : string</code><div class="description"><span class="attribute">abstract</span><p class="short_description">Generates the request information using the request and response.</p></div><div class="code-tabs"><div class="long-description"><p>This
method is called after the request has been made and RemoveSensitiveInfo()
has been called as well.</p></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the request information ready to be logged</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd><dt>See</dt><dd>\RemoveSensitiveInfo
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::GenerateSoapHeader()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GenerateSoapHeader</span><span class="nb-faded-text">()</span> : <a href="../files/http://php.net/manual/en/class.soapheader.php">\SoapHeader</a></code><div class="description"><span class="attribute">abstract</span><p class="short_description">Generates the SOAP header for the client.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/http://php.net/manual/en/class.soapheader.php">\SoapHeader</a></td><td>the instantiated SoapHeader ready to set</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::GetAdsUser()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetAdsUser</span><span class="nb-faded-text">()</span> : <a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></code><div class="description"><p class="short_description">Gets the user for this client.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></td><td>the user for this client.</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetEmail()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetEmail</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the email of the user making the request.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the email of the user making the request</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetHeaderNames()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetHeaderNames</span><span class="nb-faded-text">()</span> : array</code><div class="description"><p class="short_description">Gets the names of all registered request header elements.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>the names of the request header elements</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetHeaderValue()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetHeaderValue</span><span class="nb-faded-text">(string $key)</span> : string</code><div class="description"><p class="short_description">Gets the value for a registered request header element.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$key</th><td>string</td><td><em><p>the name of the request header element</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the value of the request header element or &lt;var&gt;NULL&lt;/var&gt;
    if not found</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetLastFaultMessage()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLastFaultMessage</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Returns the SOAP fault message if there was any</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the fault message if there was any</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetLastMethodName()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLastMethodName</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the method name for the last method called.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the name of last method called</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetLastRequestDom()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLastRequestDom</span><span class="nb-faded-text">()</span> : <a href="../files/http://php.net/manual/en/class.domdocument.php">\DOMDocument</a></code><div class="description"><p class="short_description">Get the DOMDocument representing the last request from this client.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/http://php.net/manual/en/class.domdocument.php">\DOMDocument</a></td><td>the DOMDocument representing the last request</td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/http://php.net/manual/en/class.domexception.php">\DOMException</a></td><td><em>if the DOMDocument could not be loaded</em></td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetLastRequestId()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLastRequestId</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the request ID for the last call</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the request ID of the last call</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetLastResponseDom()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLastResponseDom</span><span class="nb-faded-text">()</span> : <a href="../files/http://php.net/manual/en/class.domdocument.php">\DOMDocument</a></code><div class="description"><p class="short_description">Gets the DOMDocument representing the last response from this client.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/http://php.net/manual/en/class.domdocument.php">\DOMDocument</a></td><td>the DOMDocument representing the last response</td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td><a href="../files/http://php.net/manual/en/class.domexception.php">\DOMException</a></td><td><em>if the DOMDocument could not be loaded</em></td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetLastResponseTime()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetLastResponseTime</span><span class="nb-faded-text">()</span> : double</code><div class="description"><p class="short_description">Gets the response time for the last call</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>double</td><td>the response time of the last call</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetServer()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetServer</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the server that the request was made to.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the server that the request was made to</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetServiceName()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">GetServiceName</span><span class="nb-faded-text">()</span> : string</code><div class="description"><p class="short_description">Gets the service name for this client.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the service name for this client</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::GetTypemaps()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">GetTypemaps</span><span class="nb-faded-text">()</span> : array</code><div class="description"><p class="short_description">Returns the typemaps to be used when constructing the SOAP client.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>array</td><td>the typemap entries</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::IsFault()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">IsFault</span><span class="nb-faded-text">()</span> : void</code><div class="description"><p class="short_description">Returns <var>TRUE</var> if there was a SOAP fault during the last call.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Details</strong><dl class="function-info"><dt>Returns</dt><dd>boolean <var>TRUE</var> if there was a SOAP fault during the last
    call
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::LogRequestInfo()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">LogRequestInfo</span><span class="nb-faded-text">(string $level)</span> : void</code><div class="description"><p class="short_description">Logs the request info to the Logger::$REQUEST_INFO_LOG log the request has
transformed by PrepareRequest() and both the request has been sanitized by
RemoveSensitiveInfo().</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$level</th><td>string</td><td><em><p>the log level to use</p></em></td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>private
         
    </dd><dt>See</dt><dd>\PrepareRequest()
         
    </dd><dt>See</dt><dd>\RemoveSensitiveInfo()
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::LogSoapXml()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">LogSoapXml</span><span class="nb-faded-text">(string $level)</span> : void</code><div class="description"><p class="short_description">Logs the SOAP XML to the Logger::$SOAP_XML_LOG log after the request has
transformed by PrepareRequest() and both the request and response have
been sanitized by RemoveSensitiveInfo().</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$level</th><td>string</td><td><em><p>the log level to use</p></em></td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>private
         
    </dd><dt>See</dt><dd>\PrepareRequest()
         
    </dd><dt>See</dt><dd>\RemoveSensitiveInfo()
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::PrepareRequest()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">PrepareRequest</span><span class="nb-faded-text">(string $request, array $arguments, array $headers)</span> : string</code><div class="description"><p class="short_description">Depending on the version of PHP, the xsi:types need to be added and empty
tags may need to be removed.</p></div><div class="code-tabs"><div class="long-description"><p>The SoapRequestXmlFixer class can facilitate
these changes.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$request</th><td>string</td><td><em><p>the request to be modified</p></em></td></tr><tr><th>$arguments</th><td>array</td><td><em><p>the arguments passed to the SOAP method</p></em></td></tr><tr><th>$headers</th><td>array</td><td><em><p>the headers used in the request</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the XML request ready to be sent to the server</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::ProcessResponse()" class="anchor"></a><div class="method private"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_private.png" style="margin-right: 5px" alt="private"></img><span class="highlight">ProcessResponse</span><span class="nb-faded-text">(string $request, string $response, string $method, <a href="../files/http://php.net/manual/en/class.soapfault.php">\SoapFault</a> $e = NULL)</span> : void</code><div class="description"><p class="short_description">Processes the response from the __doRequest call.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$request</th><td>string</td><td><em><p>the request to the server</p></em></td></tr><tr><th>$response</th><td>string</td><td><em><p>the response from the server</p></em></td></tr><tr><th>$method</th><td>string</td><td><em><p>the method called</p></em></td></tr><tr><th>$e</th><td><a href="../files/http://php.net/manual/en/class.soapfault.php">\SoapFault</a></td><td><em><p>the SOAP fault thrown if any</p></em></td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>private
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::RemoveSensitiveInfo()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">RemoveSensitiveInfo</span><span class="nb-faded-text">(string $request)</span> : string</code><div class="description"><span class="attribute">abstract</span><p class="short_description">Removes any sensitive information from the request XML.</p></div><div class="code-tabs"><div class="long-description"><p>This method is
called after the request has been made and before logging any XML.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$request</th><td>string</td><td><em><p>the request just made to the server</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the request with any sensitive information removed ready to
    be logged.</td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::SetHeaderValue()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">SetHeaderValue</span><span class="nb-faded-text">(string $key, string $value)</span> : void</code><div class="description"><p class="short_description">Sets the value for a request header.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$key</th><td>string</td><td><em><p>the name of the request header element</p></em></td></tr><tr><th>$value</th><td>string</td><td><em><p>the value for the request header element</p></em></td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::TypemapLongFromXml()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">TypemapLongFromXml</span><span class="nb-faded-text">(string $xml)</span> : mixed</code><div class="description"><span class="attribute">static</span><p class="short_description">A typemap conversion function for parsing long values in SOAP responses.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$xml</th><td>string</td><td><em><p>the XML snippet containing the long value.</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>mixed</td><td>the inner long value as an integer, float, or string</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::TypemapLongToXml()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">TypemapLongToXml</span><span class="nb-faded-text">(mixed $value)</span> : string</code><div class="description"><span class="attribute">static</span><p class="short_description">A typemap conversion function for serializing long values in SOAP requests.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$value</th><td>mixed</td><td><em><p>the long value</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>an XML snippet with the serialized value</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::__SetTransportLayer()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">__SetTransportLayer</span><span class="nb-faded-text">(<a href="../files/http://php.net/manual/en/class.soapclient.php">\SoapClient</a> $client)</span> : <a href="../files/Common.Lib.AdsSoapClient.html#\AdsSoapClient">\AdsSoapClient</a></code><div class="description"><p class="short_description">Set the non-default transport layer mechanism.</p></div><div class="code-tabs"><div class="long-description"><p>WARNING: to be used for testing purposes only.</p></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$client</th><td><a href="../files/http://php.net/manual/en/class.soapclient.php">\SoapClient</a></td><td><em><p>the soap client to use.</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td><a href="../files/Common.Lib.AdsSoapClient.html#\AdsSoapClient">\AdsSoapClient</a></td><td>this prepared client.</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::__construct()" class="anchor"></a><div class="method protected"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_protected.png" style="margin-right: 5px" alt="protected"></img><span class="highlight">__construct</span><span class="nb-faded-text">(string $wsdl, array $options, <a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a> $user, string $serviceName, string $serviceNamespace)</span> : void</code><div class="description"><p class="short_description">The constructor intended to be called by all sub-classes.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$wsdl</th><td>string</td><td><em><p>URI of the WSDL file or NULL if working in non-WSDL
    mode</p>
</em></td></tr><tr><th>$options</th><td>array</td><td><em><p>the SOAP client options</p></em></td></tr><tr><th>$user</th><td><a href="../files/Common.Lib.AdsUser.html#\AdsUser">\AdsUser</a></td><td><em><p>the user which is responsible for this client</p></em></td></tr><tr><th>$serviceName</th><td>string</td><td><em><p>the name of the service which is making this
    call</p></em></td></tr><tr><th>$serviceNamespace</th><td>string</td><td><em><p>the namespace of the service</p></em></td></tr></table><strong>Details</strong><dl class="function-info"><dt>Access</dt><dd>protected
         
    </dd></dl></div><div class="clear"></div></div><a id="\AdsSoapClient::__doRequest()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">__doRequest</span><span class="nb-faded-text">(string $request, string $location, string $action, string $version,  $one_way = 0)</span> : string</code><div class="description"><p class="short_description">Overrides the method SoapClient.__doRequest() to
perform a clean up of the request XML before marshalling.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$request</th><td>string</td><td><em><p>the request XML</p></em></td></tr><tr><th>$location</th><td>string</td><td><em><p>the URL to request</p></em></td></tr><tr><th>$action</th><td>string</td><td><em><p>the SOAP action</p></em></td></tr><tr><th>$version</th><td>string</td><td><em><p>the SOAP version</p></em></td></tr><tr><th>$one_way</th><td></td><td><em></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>string</td><td>the XML SOAP response</td></tr></table></div><div class="clear"></div></div><a id="\AdsSoapClient::__soapCall()" class="anchor"></a><div class="method public"><a href="#" class="gripper"><img src="../images/icons/arrow_right.png"></img><img src="../images/icons/arrow_down.png" style="display: none;"></img></a><code class="title"><img src="../images/icons/method.png" alt="method" title="method"></img><img src="../images/icons/visibility_public.png" style="margin-right: 5px" alt="public"></img><span class="highlight">__soapCall</span><span class="nb-faded-text">(string $function_name, array $arguments, array $options = NULL, array $input_headers = NULL, array $output_headers = NULL)</span> : mixed</code><div class="description"><p class="short_description">Overrides the method SoapClient.__soapCall() to process the
response from the SOAP call.</p></div><div class="code-tabs"><div class="long-description"></div><strong>Parameters</strong><table class="argument-info"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tr><th>$function_name</th><td>string</td><td><em><p>the name of the function being called</p></em></td></tr><tr><th>$arguments</th><td>array</td><td><em><p>the arguments to that function</p></em></td></tr><tr><th>$options</th><td>array</td><td><em><p>the options for the SOAP call</p></em></td></tr><tr><th>$input_headers</th><td>array</td><td><em><p>the optional input headers</p></em></td></tr><tr><th>$output_headers</th><td>array</td><td><em><p>the options output headers</p></em></td></tr></table><strong>Returns</strong><table class="argument-info"><thead><tr><th>Type</th><th>Description</th></tr></thead><tr><td>mixed</td><td>the return from the parent __soapCall</td></tr></table><strong>Throws</strong><table class="argument-info"><thead><tr><th>Exception</th><th>Description</th></tr></thead><tr><td>\SOAPFault</td><td><em>if there was an exception making the request</em></td></tr></table></div><div class="clear"></div></div></div></div></div><small class="footer">
            Documentation was generated by
            <a href="http://phpdoc.org">phpDocumentor
                2.0.0a12</a>.
        </small></body></html>
